package com.haier.odsTask;

import com.haier.constant.Constant;
import com.haier.service.IJobService;
import com.haier.utils.GetUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yuandd
 * @description 给ods发待办demo
 * @date 2020/9/2
 **/
@RestController
@RequestMapping(value = "/ods/h5/task")
public class TaskDemo {
    @Autowired
    private IJobService iJobService;

    @RequestMapping(value = "/odsTask", method = RequestMethod.POST)
    public void apply() throws Exception {
        // 拼接待办信息
        StringBuffer title = new StringBuffer();
        title.append("[ods] 待审核：").append("吴承志").append("a0000206");
        title.append(" 申请 ").append(" 组织变更");
        String taskId = Constant.JOB_SYSID + "_" + GetUtils.getIntString(GetUtils.getInt(123L), 10);
        iJobService.begin(taskId, "a0000206", "a0038335", title.toString(), 123L);
    }
}
